home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 14
/
014.d81
/
solving again
< prev
next >
Wrap
Text File
|
2022-08-26
|
679b
|
51 lines
SOLVING THE EQUATION
There are techniques for solving the
linear diophantine equation
1) AX + BY = N
when N is divisible by (A,B), the GCD
of A and B. Remember, if N is not
divisible by (A,B), there are no
solutions.
Assume that (A,B) does divide N and
set
N
2) N'= ---
(A,B)
We know that there exist integers C
and D such that
3) AC + BD = (A,B).
Multiplying this equation by N',
4) ACN' + BDN' = (A,B)N'
but by 2), (A,B)N'=N. Thus,
5) A(CN')+B(DN') = N
and thus by definition,
X=CN' and Y=DN' is a solution to the
original equation.
--------------------------------------